From: Tim Deegan Date: Tue, 11 Sep 2007 11:30:39 +0000 (+0100) Subject: Xend: "shadow_memory" setting in xm config is in MiB, not bytes. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14980 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e58cf9dbf9637ec11acf7de9c2fd39c776c2b394;p=xen.git Xend: "shadow_memory" setting in xm config is in MiB, not bytes. Signed-off-by: Tim Deegan --- diff --git a/tools/examples/xmexample.hvm b/tools/examples/xmexample.hvm index c027f0821b..e040548186 100644 --- a/tools/examples/xmexample.hvm +++ b/tools/examples/xmexample.hvm @@ -28,6 +28,7 @@ builder='hvm' memory = 128 # Shadow pagetable memory for the domain, in MB. +# If not explicictly set, xend will pick an appropriate value. # Should be at least 2KB per MB of domain memory, plus a few MB per vcpu. # shadow_memory = 8 diff --git a/tools/python/xen/xend/XendCheckpoint.py b/tools/python/xen/xend/XendCheckpoint.py index ac53e945b1..a79c2b4ce2 100644 --- a/tools/python/xen/xend/XendCheckpoint.py +++ b/tools/python/xen/xend/XendCheckpoint.py @@ -200,7 +200,7 @@ def restore(xd, fd, dominfo = None, paused = False): maxmem = restore_image.getRequiredAvailableMemory( dominfo.info['memory_static_max'] / 1024) shadow = restore_image.getRequiredShadowMemory( - dominfo.info['shadow_memory'] / 1024, + dominfo.info['shadow_memory'] * 1024, dominfo.info['memory_static_max'] / 1024) log.debug("restore:shadow=0x%x, _static_max=0x%x, _static_min=0x%x, ", diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 20009b0760..65e38f82d5 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -1610,7 +1610,7 @@ class XendDomainInfo: maxmem = self.image.getRequiredAvailableMemory( self.info['memory_static_max'] / 1024) shadow = self.image.getRequiredShadowMemory( - self.info['shadow_memory'] / 1024, + self.info['shadow_memory'] * 1024, self.info['memory_static_max'] / 1024) log.debug("_initDomain:shadow_memory=0x%x, memory_static_max=0x%x, memory_static_min=0x%x.", self.info['shadow_memory'], self.info['memory_static_max'], self.info['memory_static_min'],)